package com.onedec.entity;

import java.util.ArrayList;
import java.util.List;

public class OnedecContractExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public OnedecContractExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andContractIdIsNull() {
            addCriterion("contract_id is null");
            return (Criteria) this;
        }

        public Criteria andContractIdIsNotNull() {
            addCriterion("contract_id is not null");
            return (Criteria) this;
        }

        public Criteria andContractIdEqualTo(Integer value) {
            addCriterion("contract_id =", value, "contractId");
            return (Criteria) this;
        }

        public Criteria andContractIdNotEqualTo(Integer value) {
            addCriterion("contract_id <>", value, "contractId");
            return (Criteria) this;
        }

        public Criteria andContractIdGreaterThan(Integer value) {
            addCriterion("contract_id >", value, "contractId");
            return (Criteria) this;
        }

        public Criteria andContractIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("contract_id >=", value, "contractId");
            return (Criteria) this;
        }

        public Criteria andContractIdLessThan(Integer value) {
            addCriterion("contract_id <", value, "contractId");
            return (Criteria) this;
        }

        public Criteria andContractIdLessThanOrEqualTo(Integer value) {
            addCriterion("contract_id <=", value, "contractId");
            return (Criteria) this;
        }

        public Criteria andContractIdIn(List<Integer> values) {
            addCriterion("contract_id in", values, "contractId");
            return (Criteria) this;
        }

        public Criteria andContractIdNotIn(List<Integer> values) {
            addCriterion("contract_id not in", values, "contractId");
            return (Criteria) this;
        }

        public Criteria andContractIdBetween(Integer value1, Integer value2) {
            addCriterion("contract_id between", value1, value2, "contractId");
            return (Criteria) this;
        }

        public Criteria andContractIdNotBetween(Integer value1, Integer value2) {
            addCriterion("contract_id not between", value1, value2, "contractId");
            return (Criteria) this;
        }

        public Criteria andContractProjectIdIsNull() {
            addCriterion("contract_project_id is null");
            return (Criteria) this;
        }

        public Criteria andContractProjectIdIsNotNull() {
            addCriterion("contract_project_id is not null");
            return (Criteria) this;
        }

        public Criteria andContractProjectIdEqualTo(Integer value) {
            addCriterion("contract_project_id =", value, "contractProjectId");
            return (Criteria) this;
        }

        public Criteria andContractProjectIdNotEqualTo(Integer value) {
            addCriterion("contract_project_id <>", value, "contractProjectId");
            return (Criteria) this;
        }

        public Criteria andContractProjectIdGreaterThan(Integer value) {
            addCriterion("contract_project_id >", value, "contractProjectId");
            return (Criteria) this;
        }

        public Criteria andContractProjectIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("contract_project_id >=", value, "contractProjectId");
            return (Criteria) this;
        }

        public Criteria andContractProjectIdLessThan(Integer value) {
            addCriterion("contract_project_id <", value, "contractProjectId");
            return (Criteria) this;
        }

        public Criteria andContractProjectIdLessThanOrEqualTo(Integer value) {
            addCriterion("contract_project_id <=", value, "contractProjectId");
            return (Criteria) this;
        }

        public Criteria andContractProjectIdIn(List<Integer> values) {
            addCriterion("contract_project_id in", values, "contractProjectId");
            return (Criteria) this;
        }

        public Criteria andContractProjectIdNotIn(List<Integer> values) {
            addCriterion("contract_project_id not in", values, "contractProjectId");
            return (Criteria) this;
        }

        public Criteria andContractProjectIdBetween(Integer value1, Integer value2) {
            addCriterion("contract_project_id between", value1, value2, "contractProjectId");
            return (Criteria) this;
        }

        public Criteria andContractProjectIdNotBetween(Integer value1, Integer value2) {
            addCriterion("contract_project_id not between", value1, value2, "contractProjectId");
            return (Criteria) this;
        }

        public Criteria andContractScanningIsNull() {
            addCriterion("contract_scanning is null");
            return (Criteria) this;
        }

        public Criteria andContractScanningIsNotNull() {
            addCriterion("contract_scanning is not null");
            return (Criteria) this;
        }

        public Criteria andContractScanningEqualTo(String value) {
            addCriterion("contract_scanning =", value, "contractScanning");
            return (Criteria) this;
        }

        public Criteria andContractScanningNotEqualTo(String value) {
            addCriterion("contract_scanning <>", value, "contractScanning");
            return (Criteria) this;
        }

        public Criteria andContractScanningGreaterThan(String value) {
            addCriterion("contract_scanning >", value, "contractScanning");
            return (Criteria) this;
        }

        public Criteria andContractScanningGreaterThanOrEqualTo(String value) {
            addCriterion("contract_scanning >=", value, "contractScanning");
            return (Criteria) this;
        }

        public Criteria andContractScanningLessThan(String value) {
            addCriterion("contract_scanning <", value, "contractScanning");
            return (Criteria) this;
        }

        public Criteria andContractScanningLessThanOrEqualTo(String value) {
            addCriterion("contract_scanning <=", value, "contractScanning");
            return (Criteria) this;
        }

        public Criteria andContractScanningLike(String value) {
            addCriterion("contract_scanning like", value, "contractScanning");
            return (Criteria) this;
        }

        public Criteria andContractScanningNotLike(String value) {
            addCriterion("contract_scanning not like", value, "contractScanning");
            return (Criteria) this;
        }

        public Criteria andContractScanningIn(List<String> values) {
            addCriterion("contract_scanning in", values, "contractScanning");
            return (Criteria) this;
        }

        public Criteria andContractScanningNotIn(List<String> values) {
            addCriterion("contract_scanning not in", values, "contractScanning");
            return (Criteria) this;
        }

        public Criteria andContractScanningBetween(String value1, String value2) {
            addCriterion("contract_scanning between", value1, value2, "contractScanning");
            return (Criteria) this;
        }

        public Criteria andContractScanningNotBetween(String value1, String value2) {
            addCriterion("contract_scanning not between", value1, value2, "contractScanning");
            return (Criteria) this;
        }

        public Criteria andContract1IsNull() {
            addCriterion("contract1 is null");
            return (Criteria) this;
        }

        public Criteria andContract1IsNotNull() {
            addCriterion("contract1 is not null");
            return (Criteria) this;
        }

        public Criteria andContract1EqualTo(String value) {
            addCriterion("contract1 =", value, "contract1");
            return (Criteria) this;
        }

        public Criteria andContract1NotEqualTo(String value) {
            addCriterion("contract1 <>", value, "contract1");
            return (Criteria) this;
        }

        public Criteria andContract1GreaterThan(String value) {
            addCriterion("contract1 >", value, "contract1");
            return (Criteria) this;
        }

        public Criteria andContract1GreaterThanOrEqualTo(String value) {
            addCriterion("contract1 >=", value, "contract1");
            return (Criteria) this;
        }

        public Criteria andContract1LessThan(String value) {
            addCriterion("contract1 <", value, "contract1");
            return (Criteria) this;
        }

        public Criteria andContract1LessThanOrEqualTo(String value) {
            addCriterion("contract1 <=", value, "contract1");
            return (Criteria) this;
        }

        public Criteria andContract1Like(String value) {
            addCriterion("contract1 like", value, "contract1");
            return (Criteria) this;
        }

        public Criteria andContract1NotLike(String value) {
            addCriterion("contract1 not like", value, "contract1");
            return (Criteria) this;
        }

        public Criteria andContract1In(List<String> values) {
            addCriterion("contract1 in", values, "contract1");
            return (Criteria) this;
        }

        public Criteria andContract1NotIn(List<String> values) {
            addCriterion("contract1 not in", values, "contract1");
            return (Criteria) this;
        }

        public Criteria andContract1Between(String value1, String value2) {
            addCriterion("contract1 between", value1, value2, "contract1");
            return (Criteria) this;
        }

        public Criteria andContract1NotBetween(String value1, String value2) {
            addCriterion("contract1 not between", value1, value2, "contract1");
            return (Criteria) this;
        }

        public Criteria andContract2IsNull() {
            addCriterion("contract2 is null");
            return (Criteria) this;
        }

        public Criteria andContract2IsNotNull() {
            addCriterion("contract2 is not null");
            return (Criteria) this;
        }

        public Criteria andContract2EqualTo(String value) {
            addCriterion("contract2 =", value, "contract2");
            return (Criteria) this;
        }

        public Criteria andContract2NotEqualTo(String value) {
            addCriterion("contract2 <>", value, "contract2");
            return (Criteria) this;
        }

        public Criteria andContract2GreaterThan(String value) {
            addCriterion("contract2 >", value, "contract2");
            return (Criteria) this;
        }

        public Criteria andContract2GreaterThanOrEqualTo(String value) {
            addCriterion("contract2 >=", value, "contract2");
            return (Criteria) this;
        }

        public Criteria andContract2LessThan(String value) {
            addCriterion("contract2 <", value, "contract2");
            return (Criteria) this;
        }

        public Criteria andContract2LessThanOrEqualTo(String value) {
            addCriterion("contract2 <=", value, "contract2");
            return (Criteria) this;
        }

        public Criteria andContract2Like(String value) {
            addCriterion("contract2 like", value, "contract2");
            return (Criteria) this;
        }

        public Criteria andContract2NotLike(String value) {
            addCriterion("contract2 not like", value, "contract2");
            return (Criteria) this;
        }

        public Criteria andContract2In(List<String> values) {
            addCriterion("contract2 in", values, "contract2");
            return (Criteria) this;
        }

        public Criteria andContract2NotIn(List<String> values) {
            addCriterion("contract2 not in", values, "contract2");
            return (Criteria) this;
        }

        public Criteria andContract2Between(String value1, String value2) {
            addCriterion("contract2 between", value1, value2, "contract2");
            return (Criteria) this;
        }

        public Criteria andContract2NotBetween(String value1, String value2) {
            addCriterion("contract2 not between", value1, value2, "contract2");
            return (Criteria) this;
        }

        public Criteria andContract3IsNull() {
            addCriterion("contract3 is null");
            return (Criteria) this;
        }

        public Criteria andContract3IsNotNull() {
            addCriterion("contract3 is not null");
            return (Criteria) this;
        }

        public Criteria andContract3EqualTo(String value) {
            addCriterion("contract3 =", value, "contract3");
            return (Criteria) this;
        }

        public Criteria andContract3NotEqualTo(String value) {
            addCriterion("contract3 <>", value, "contract3");
            return (Criteria) this;
        }

        public Criteria andContract3GreaterThan(String value) {
            addCriterion("contract3 >", value, "contract3");
            return (Criteria) this;
        }

        public Criteria andContract3GreaterThanOrEqualTo(String value) {
            addCriterion("contract3 >=", value, "contract3");
            return (Criteria) this;
        }

        public Criteria andContract3LessThan(String value) {
            addCriterion("contract3 <", value, "contract3");
            return (Criteria) this;
        }

        public Criteria andContract3LessThanOrEqualTo(String value) {
            addCriterion("contract3 <=", value, "contract3");
            return (Criteria) this;
        }

        public Criteria andContract3Like(String value) {
            addCriterion("contract3 like", value, "contract3");
            return (Criteria) this;
        }

        public Criteria andContract3NotLike(String value) {
            addCriterion("contract3 not like", value, "contract3");
            return (Criteria) this;
        }

        public Criteria andContract3In(List<String> values) {
            addCriterion("contract3 in", values, "contract3");
            return (Criteria) this;
        }

        public Criteria andContract3NotIn(List<String> values) {
            addCriterion("contract3 not in", values, "contract3");
            return (Criteria) this;
        }

        public Criteria andContract3Between(String value1, String value2) {
            addCriterion("contract3 between", value1, value2, "contract3");
            return (Criteria) this;
        }

        public Criteria andContract3NotBetween(String value1, String value2) {
            addCriterion("contract3 not between", value1, value2, "contract3");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}